Index changes by external issue tracking systems Parse out external references from footer lines in the commit message based on configuration in gerrit.config. Connect the change with the external tracking ids and tracking system in a new table in the DB, making the tracking ids searchable by tr:<id>. Bug: issue 124 Change-Id: I3ddada57240040f27329f5f26f1f8e99e94f1469
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 9bcdaab..f591771 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt
@@ -1551,6 +1551,50 @@ + By default a shade of yellow, `FFFFCC`. +[[trackingid]] Section trackingid +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tagged footer lines containing references to exteranal tracking systems, +parsed out of the commit message and saved in Gerrit's DB. + +The tracking ids are serachable using tr:<tracking id>. + +---- +[trackingid "jira-bug"] + footer = Bugfix: + match = JRA\\d{2,8} + system = JIRA + +[trackingid "jira-feature"] + footer = Feature + match = JRA(\\d{2,8}) + system = JIRA +---- + +[[trackingid.name.footer]]trackingid.<name>.footer:: ++ +A prefix tag that identify the footer line to parse for tracking ids. +Several trakingid entries can have the same footer tag. +(the trailing ":" is optional) + +[[trackingid.name.match]]trackingid.<name>.match:: ++ +A regular expression used to match the external tracking id part of the +footer line. The match can result in several entries in the DB. +If grouping is used in the regex the first group will be interpreted +as the tracking id. Tracking ids > 20 char will be ignored. ++ +The configuration file parser eats one level of backslashes, so the +character class `\s` requires `\\s` in the configuration file. The +parser also terminates the line at the first `#`, so a match +expression containing # must be wrapped in double quotes. + +[[trackingid.name.system]]trackingid.<name>.system:: ++ +The name of the external tracking system(max 10 char). +It is possible to have several trackingid entries for the same +tracking system. + [[transfer]] Section transfer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~